<!doctype html>
<html>
<head>
<meta charset="utf8"/>
<title>购物车 查看购物车</title>
<meta name="keywords" content="购物车 查看购物车"/>
<meta name="description" content="购物车 查看购物车"/>
<link href="__PUBLIC__/css/topbar.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/Content/orderpublic_v1.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/Content/cart_v1.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/Scripts/jquery-1.6-min.js"></script> 
<script src="__PUBLIC__/Scripts/cart.js"></script> 
</head>
<body>
    <div class="zc-topbar">
        <div class="wrapper clearfix">
            <div class="zc-login-info">
                <span class="zc-back-home"><a href="{:U('Home/Index/index')}">商城首页</a></span>
                <if condition="$_SESSION['login'] eq null">         
                   <span class="zc-login">Hi~欢迎来到<span style="font-weight:bold">四人定制</span>商城，请<a href="{:U('Login/login')}">登录</a></span>
                    <span class="zc-register"><a href="{:U('Register/register')}">免费注册</a></span>
                <else />
                    <span class="zc-login">Hi~欢迎来到<span style="font-weight:bold">四人定制</span>商城，<a href="">{$_SESSION['login']['username']}</a></span>
                    <span class="zc-register"><a href="{:U('Login/loginout')}">退出</a></span>
                </if>
            </div>
            <ul class="zc-quick-menu">
                <li><a href="{:U('Home/Order/index')}">我的订单</a></li>
                <li class="zc-my-center" onmouseover="showUI(this)" onmouseout="hideUI(this)">
    
                    <a href="{:U('Home/User/index')}" class="zc-hd" >买家中心<i class="ico"></i></a>
                </li>
                <li><a href="{:U('Home/Cart/index')}" id="shop-cart-num">购物车</a></li>
                    <li><a href="">帮助中心</a></li>
                    <li class="lianxikefu"><a href="javascript:;"  onmouseover="showUI(this)" onmouseout="hideUI(this)" class="zc-hd">联系客服<i class="ico"></i></a>
                        <div class="zc-service-tel">400-678-0068</div>
                    </li>
                    
                </li>
            </ul>
        </div>
    </div> 
    <script>    
    var Z_now_time = "1446556752";
    var z_user_id = "";
    function showUI(obj) {
    var className = obj.className;
    if (className == "zc-my-center") {
    obj.className = "zc-my-center zc-hover";
    document.getElementById("zc-my-center-bd").style.display = "block";
    } else if (className == "zc-mobile") {
    obj.className = "zc-mobile zc-hover";
    document.getElementById("zc-mobile-bd").style.display = "block";
    } else {
    obj.parentNode.className = "lianxikefu zc-hover";
    obj.nextSibling.style.display = "block";
    }
    }
    function hideUI(obj) {
    var className = obj.className;
    if (className == "zc-my-center zc-hover") { 
    obj.className = "zc-my-center"; 
    document.getElementById("zc-my-center-bd").style.display = "none"; 
    } else if (className == "zc-mobile zc-hover") { 
    obj.className = "zc-mobile"; 
    document.getElementById("zc-mobile-bd").style.display = "none"; 
    } else {
    obj.parentNode.className = "lianxikefu";
    obj.nextSibling.style.display = "none";
    }    }
    
    </script>

<!-- topbar -->
<!-- 此处需要修改js里面的链接地址 -->
<script src="Scripts/index.js"></script>
    <div class="wrapper">        
    <form action="{:U('Home/Dingdan/pay')}" method="post">
        <input type="hidden" name="buyType" value="2"/>
    
    
    
	<div class="cart-state mt">	
		<!-- <p>购物车状态<em>（1/30）</em></p> -->
		<div class="total"><input name="submitCart" type="submit" value="去结算"><span>总计：<em>&yen;</em><em class="total-cart-price">{$cart1.total}</em></span></div>
    </form>
	</div>
     </div> 
    <div class="wrapper">          
	<div class="order-table mt20">
		<table width="100%">
			<tr>
                <th class="th-1">商品名称</th>
                <th class="th-3">商品图片</th>
				<th class="th-3">单价（元）</th>
				<th class="th-1">数量</th>
				<!-- <th class="th-5">优惠</th> -->
				<th class="th-6">小计（元）</th>
				<th class="th-7">操作</th>
			</tr> 
            <!-- 遍历 -->
            <notempty name='cart'>
            <foreach name='cart' item='val'>                             
			<tr rel="goods-order"  id="cart_2150660">
				<div class="info-con">
                    <td class="s-infor">{$val.goods}</td>
				</div>
                <td><img src="__ROOT__/Uploads/v_{$val.picname}" /></td>
				<td class="s-price ">                                    
                    <em>{$val.price}</em>  
				</td>
				<td class="s-amount ">
				<div class="buy-num">   
                <a class="minus" href="javascript:void(0)" title="减一" onclick='window.location="{:U('Home/Cart/num?number=-1&id='.$val['id'])}"'>-</a>
                <input style="text-align:center" type="text" autocomplete="off" class="text-amount" value="{$val.num}" onBlur="$.updateCartnumber({cartId:'2150660', maxNumber:'11',updateType:'change', costNumber:'1', merchantId:'188527'})" id="cartNumber_2150660">
                <a class="plus" href="javascript:void(0)" title="加一" onclick='window.location="{:U('Home/Cart/num?number=1&id='.$val['id'])}"'>+</a>
                <div class="tips-2" id="tips_2150660" style="display:none;"></div>
                </div>
				</td>
				<td class="s-total">
                        <em id="cartGoodsPcie_2150660">{$val['price']*$val['num']}</em>
				</td>
				<td >
					 <button title="删除" onclick='window.location="{:U('Home/Cart/del?id='.$val['id'])}"'>删除</button>
				</td>
			</tr> 
        </foreach> 
        <else/>
                <tr>
                    <td align='center' valign='middle' colspan="6"><span style="font-weight:bold;font-size:20px;color:red;">亲！您的购物车为空!<br/>您可以点击右下方的“继续购物”按钮进行购物</span></td>
                </tr>
        </notempty>                         
        </table> 
		
		<div class="total-price">商品总价：<em>&yen;</em><em class="total-cart-price">{$cart1.total}</em></div>
		
		<div class="order-foot clearfix">
               <button onclick='window.location="{:U('Home/Cart/delAll')}"'>清空购物车</button>         			
			<a href="{:U('Home/Index/index')}" class="go-shopping">&lt;&lt;继续购物</a>
            <button class="accounting-btn" onclick='window.location="{:U('Home/Dingdan/pay')}"'>去结算</button>			
		</div>		
	</div>    
<!-- </form> -->    
</div>

<div class="footer">
    <p class="links"><a target="_blank" href="http://www.zol.com/help/detail/17/73/675.html">关于商城</a>|<a target="_blank" href="http://www.zol.com/marketing/">营销中心</a>|<a target="_blank" href="http://www.zol.com/help/">服务中心</a>|<a target="_blank" href="http://www.zol.com/help/detail/17/73/674.html">联系我们</a>|<a target="_blank" href="http://www.zol.com/help/detail/17/73/676.html">发展历程</a>|<a target="_blank" href="http://www.zol.com/help/detail/17/73/677.html">媒体报道</a></p>
    <p><span class="copyright">&copy;<script type="text/javascript">
    var yearStr;
    now = new Date();
    yearStr = now.getFullYear();
    document.write(yearStr);</script>中关村在线 版权所有. 京ICP备09041801号-182 <a target="_blank" href="http://www.miibeian.gov.cn/">京ICP证010391号</a></span></p>
    <div class="authentication"><a target="_blank" href="http://www.hd315.gov.cn/beian/view.asp?bianhao=010202001021500016"><img width="108" height="40" alt="经营性网站备案信息" src="__PUBLIC__/Picture/beian.png"></a><a target="_blank" href="http://fzp.bjhd.gov.cn/tabid/179/Default.aspx"><img width="108" height="40" alt="海淀网络警察提醒您" src="__PUBLIC__/Picture/jingcha.png"></a><a target="_blank" href="https://search.szfw.org/cert/l/CX20111228001277001325" id="___szfw_logo___"><img src="__PUBLIC__/Picture/cert.png"></a>
<script type="text/javascript">(function() {
        document.getElementById('___szfw_logo___').oncontextmenu = function() {
            return false;
        }
    })();</script></div>
<script language="JavaScript" src="Scripts/pv.js" type="text/javascript"></script>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F7daf617aaf843f0f55a422b00d7de1e7' type='text/javascript'%3E%3C/script%3E"));
</script>
</div><script type="text/javascript">
        
</script>
<script type="text/javascript">
window["_BFD"] = window["_BFD"] || {};
_BFD.BFD_INFO = {
	items : [
                                            ['25300021', 1245, 1],
                            ],
	user_id : "44596851",	
	client : "Ctest_zgc"		
};
_BFD.script = document.createElement("script");
_BFD.script.type = 'text/javascript';
_BFD.script.async = true;
_BFD.script.charset = 'utf-8';
_BFD.script.src = (('https:' == document.location.protocol?'https://ssl-static1':'http://static1')+'.baifendian.com/service/zhongguancun/zx_cart.js');
document.getElementsByTagName("head")[0].appendChild(_BFD.script);
function RecommendGoods(datas){    
    var baseDetailUrl = "http://www.zol.com";
    var datasLength = datas.length;        
    var goodsArr    = new Array();
    if (datasLength){
        for (var i = 0; i < datasLength; i++){
            goodsArr.push(datas[i].iid);                
        }    
    }       
    if (goodsArr.length){
        var str = '';
        var url = baseDetailUrl+"/index.php?c=Ajax_GoodsRecommend&callback=?&t="+Math.random();    
        var goodsStr = goodsArr.join(",", goodsArr);
        $.getJSON(
            url,
            {goodsIdStr:goodsStr, goodsNumber:5},
            function(data){
                if (data.flag){
                    var goodsInfo = data.goodsInfo;      
                    str += '<ul class="modgoods-list clearfix" style="display:block;">';
                    for (key in goodsInfo){
                        str += '<li>';
                        str += '<a class="pic" href="'+goodsInfo[key].goodsUrl+'" title="'+goodsInfo[key].goodsName+'" target="_blank"><img width="160" height="120" src="'+goodsInfo[key].picUrl+'" alt="'+goodsInfo[key].goodsName+'"><span>'+goodsInfo[key].goodsName+'</span></a>';                        
                        str += '<div class="price">&yen;'+goodsInfo[key].goodsPrice+'</div>';
                        str += '</li>';                        
                    }    
                    str += '</ul>';
                    $(".modgoods-tabbox").html(str);
                }else{
                    $("#zp-goods-recommend").remove();                        
                }
            }
        )        
    }else{
        $("#zp-goods-recommend").remove();    
    }        
}
</script>
</body>
</html>